package com.paradox.aggregation.consumer.kafka;

import com.paradox.aggregation.providerAPI.config.MessageVo;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

@Component("kafkaConsumer")
public class Consumer {

    @KafkaListener(topics = "test")
    public void onMessage(ConsumerRecord<String, String> record, Acknowledgment ack){
        System.out.println(record.key());
        System.out.println(record.value().toString());
        ack.acknowledge();
    }
}
